import { $baseApi } from "@/utils/http-instance"
import useCommonStore from "@/store/common"

const commonStore = useCommonStore()

// 首页轮播图
export const $getBannerList = () => $baseApi.get(`regions/${commonStore.region_id}/slide-images/list-of-mini-home`)

// 腰封位轮播图
export const $getWaistList = () => $baseApi.get(`regions/${commonStore.region_id}/slide-images/list-of-mini-waist`)

// 目的地轮播公告
export const $getNoticeList = () => $baseApi.get(`regions/${commonStore.region_id}/notices/list-of-effective`)

// 目的地弹窗
export const $getHomePopup = () => $baseApi.get(`regions/${commonStore.region_id}/popups/get-of-top-effective`)

// 热门景点
export const $getResortRecommendList = () =>
	$baseApi.get(`regions/${commonStore.region_id}/resort-sales/list-of-recommended`)
// 爆款线路
export const $getTripRecommendList = () =>
	$baseApi.get(`regions/${commonStore.region_id}/trip-spu-sales/list-of-recommended`)

// 目的地首页瀑布流
export const $getWaterfallList = () => $baseApi.get(`regions/${commonStore.region_id}/waterfalls/list-of-sale`)

//  首页搜索
export const $getSearchList = (params: any) =>
	$baseApi.get(`regions/${commonStore.region_id}/resources/list-of-search`, params)

// 活动页
export const $getThemeDetail = (id: string) => $baseApi.get(`themes/get/${id}`)
